part of 'updatable.dart';

class StateNum extends StorableState<num> {
  StateNum({required super.initValue, required super.storeKey, super.autoSave});
  num operator +(num other) {
    value = value + other;
    return value;
  }

  num operator -(num other) {
    value = value - other;
    return value;
  }
}

class StateInt extends StorableState<int> {
  StateInt({required super.initValue, required super.storeKey, super.autoSave});

  StateInt operator +(int other) {
    value = value + other;
    return this;
  }

  StateInt operator -(int other) {
    value = value - other;
    return this;
  }
}

class StateDouble extends StorableState<double> {
  StateDouble(
      {required super.initValue, required super.storeKey, super.autoSave});

  StateDouble operator +(num other) {
    value = value + other;
    return this;
  }

  StateDouble operator -(num other) {
    value = value - other;
    return this;
  }
}